﻿namespace fpsrpg
{
    using System;
    using System.Collections.Generic;
    using System.Text;

    using Microsoft.Xna.Framework;
    using Microsoft.Xna.Framework.Content;
    using Microsoft.Xna.Framework.Graphics;
    using Microsoft.Xna.Framework.Input;
    using Microsoft.Xna.Framework.Storage;

    public class Hats
    {
        #region Fields

        public int Customize_hat;
        public Color Customize_hat_color;
        public string Customize_hat_title;
        public Texture2D HatTexture;

        #endregion Fields

        #region Constructors

        public Hats()
        {
            Customize_hat_color = Color.White;
            Customize_hat = Properties.Settings.Default.Customize_hat;
            HatTexture = Program.gameinstance.Content.Load<Texture2D>("customize_hat1");
            Customize_hat_switch(Properties.Settings.Default.Customize_hat, Program.gameinstance.Content);
        }

        #endregion Constructors

        #region Methods

        public void Customize_hat_switch(int Customize_hat_number, ContentManager TheContentManager)
        {
            switch (Customize_hat_number)
            {
                case 1:
                    HatTexture = TheContentManager.Load<Texture2D>("customize_hat1");
                    Customize_hat_title = "Round hat";
                    break;
                case 2:
                    HatTexture = TheContentManager.Load<Texture2D>("customize_hat2");
                    Customize_hat_title = "Forward cap";
                    break;
                case 3:
                    HatTexture = TheContentManager.Load<Texture2D>("customize_hat6");
                    Customize_hat_title = "Backward cap";
                    break;
                case 4:
                    HatTexture = TheContentManager.Load<Texture2D>("customize_hat3");
                    Customize_hat_title = "Tactical helm";
                    break;
                case 5:
                    HatTexture = TheContentManager.Load<Texture2D>("customize_hat4");
                    Customize_hat_title = "Heavy helm";
                    break;
                case 6:
                    HatTexture = TheContentManager.Load<Texture2D>("customize_hat5");
                    Customize_hat_title = "Gasmask";
                    break;
                default:
                    HatTexture = TheContentManager.Load<Texture2D>("customize_hat1");
                    Customize_hat_title = "Default helm";
                    break;
            }
            Properties.Settings.Default.Save();
        }

        #endregion Methods
    }
}